/*
 * Copyright 2010-2012 Susanta Tewari. <freecode4susant@users.sourceforge.net>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package sampledata.genomemap.data;

import cef.pui.pob.Builder;
import commons.nb.data.DNData_FileBased;
import genomemap.cef.pui.pob.Builders_Gen;
import genomemap.data.TAB08Data;

import java.util.Properties;

/**
 * @author Susanta Tewari
 * @version 1.0.0
 * @since 1.0.0
 */
public abstract class DNData_FileBased_TAB08Data extends DNData_FileBased<TAB08Data> {

    public DNData_FileBased_TAB08Data(final String displayName, final String shortDescription,
                                      final String URL) {
        super(displayName, shortDescription, URL, "sampledata/genomemap/data/TAB08Data16.png");
    }

    @Override
    public Class<TAB08Data> getBuilderValueType() {
        return TAB08Data.class;
    }

    /**
     * @version version
     * @since since
     * @history Created on 07/19/2013
     * @author Susanta Tewari
     */
    public static class XML extends DNData_FileBased_TAB08Data {

        public XML(String displayName, String shortDescription, String URL) {
            super(displayName, shortDescription, URL);
        }

        @Override
        protected Builder<TAB08Data> of_Builder(String file_URL) {

            final Properties props = new Properties();

            props.setProperty("genomemap.builder.TAB08Data.url", "tab08data:xml//" + file_URL);

            return Builders_Gen.of_Data_TAB08_File(props, null);
        }
    }
}
